package tech.summerly.weather.data.remote

import kotlinx.coroutines.experimental.Deferred
import retrofit2.http.GET
import retrofit2.http.Path
import tech.summerly.weather.data.bean.Forecast
import tech.summerly.weather.data.bean.RealTime
import tech.summerly.weather.data.bean.WeatherResponse

/**
 * Created by summer on 18-3-7
 *
 * 彩云服务接口API
 */
interface CaiYunServiceApi {

    /**
     * 彩云实时天气API接口
     */
    @GET(value = "{dummyLocation}/realtime.json")
    fun getRealTime(@Path(value = "dummyLocation") location: String): Deferred<WeatherResponse<RealTime>>

    /**
     * 彩云天气预报接口
     */
    @GET(value = "{dummyLocation}/forecast.json")
    fun getForecast(@Path(value = "dummyLocation") location: String): Deferred<WeatherResponse<Forecast>>

}